<%--
 *  File:   ZylAllProcRun.jsp
 *  Author: jackwang 
 *  Date:   2013/02/23
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>
<%@ page import="com.oval.emanager.service.*" %>


<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
	String privilegeCode = "11502";
    String strModuleName = "UPM";
%>

<% //--------------------------------------  include files list --%>
<%--@ include file="/inc/Security.inc" --%>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>


<html>
<head>
<title>ZylAllProcRun.jsp</title>
<PageFlow:CheckPageFlow pageName="p_zylallprocrun"/>
<%
    Vector totalsummary = (Vector)pageContext.getAttribute("totalsummary");
	if(totalsummary == null)
	{
		totalsummary = new Vector();
	}
	HashMap userinfo = (HashMap)session.getAttribute("userinfo");
	if(userinfo == null)
	{
		userinfo = new HashMap();
	}
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="../../js/FuncLib.js"></script>
<script language="JavaScript">
function page_summary(actionvalue,orderbyname){
  	 var editform = summaryPrepare(cform,actionvalue,orderbyname);
 	 editform.action = "ZylAllProcRun.jsp?<%= OvalTools.randomURL() %>";
 	setTimeout("page_summary(actionvalue,orderbyname);","5000");
 	 editform.target = "_self";
 	 isRunning = true;
 	 editform.submit();
 		
}
function page_submit(name)
{     
  document.cform.portname.value= name;
  document.cform.actionname.value="submit";
  document.cform.target="_self";
  isRunning = true;
  document.cform.submit();
}	
</script>
<script>
function bgChange(obj){
	obj.bgColor=obj.bgColor==""?"#87CEEB":"";
}
function bgMouseOut(obj){
	obj.bgColor="";
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%@ include file="/inc/PageLocation.inc" %>
<%@ include file="/inc/SummaryDivision.inc" %>
<form name="cform" method="post" action="../../Dispatcher">
  <input type="hidden" name="pagename" value="p_zylallprocrun">
  <input type="hidden" name="actionname">    
  <input type="hidden" name="portname"> 

<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <td> 
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
         <tr  class="deepblue-left"> 
            <td  class="title_center"  width="5%">&nbsp;<%= label.getLabelName("L_OrdNumber") %></td>
            <td  class="title_center"  width="10%"><a href="javascript:page_summary('orderby','proccode')">事务名称</a></td>
            <td  class="title_center"  width="30%"><a href="javascript:page_summary('orderby','procname')">事务描述</a></td>
            <td  class="title_center"  width="10%"><a href="javascript:page_summary('orderby','laststarttime')"><%= label.getLabelName("L_StartTime") %></a></td>
            <td  class="title_center"  width="10%"><a href="javascript:page_summary('orderby','lastendtime')"><%= label.getLabelName("L_EndTime") %></a></td>
            <td  class="title_center"  width="10%"><a href="javascript:page_summary('orderby','lastrunmsg')"><%= label.getLabelName("L_Information") %></a></td>
            <td  class="title_center"  width="10%"><a href="javascript:page_summary('orderby','lastctrltime">最后运行时间</a></td>
            <td  class="title_center"  width="10%"><a href="javascript:page_summary('orderby','employeename')">操作人</a></td>
            <td  class="title_center"  width="*">&nbsp;</td>
         </tr>
         <%
             int j = 0;
          %>
          <logic:iterate id="dept" collection="<%= totalsummary %>">                      
          <%
          	HashMap tempMap = (HashMap) pageContext.getAttribute("dept");
            String proccode = (String)tempMap.get("proccode");
            j++;     
          %>
           <tr onmouseover="bgChange(this)" onmouseout="bgMouseOut(this)">
            <td ><%=j %></td>
            <td >&nbsp;<oval:write name="dept" property="proccode"/></td>
            <td >&nbsp;<oval:write name="dept" property="procname"/></td>
            <td >&nbsp;<oval:write name="dept" property="laststarttime"/></td>
            <td >&nbsp;<oval:write name="dept" property="lastendtime"/></td>
            <td >&nbsp;<oval:write name="dept" property="lastrunmsg"/></td>
            <td >&nbsp;<oval:write name="dept" property="lastctrltime"/></td>
            <td >&nbsp;<oval:write name="dept" property="employeename"/></td>
            <td class="title_center" > 
            <%
            	if(proccode.equals("TARGET_FLOW") || proccode.equals("monthcompass")){
            %>
            &nbsp;
            <%}else{ %>
            	<a onClick="page_submit('<oval:write name="dept" property="proccode"/>')">
            		<input type="button" class="button1" value="<%= label.getLabelName("L_Execute") %>"style="width:50">
            	</a>
            <%} %>
            </td>
          </tr>
          </logic:iterate>  
        </tr>
        
      <% //--------------------------------------  flipping page --%>
      <%@ include file="/inc/SummaryAction.inc" %>
</table>
</form>
</body>
</html>


